package top.shiyiri.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author Aunean
 * @date 2022/2/10 16:41
 */
public class Filter3 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Filter3 前置代码");
        System.out.println("Filter3 线程：" + Thread.currentThread().getName());
        System.out.println("Filter3：" + servletRequest.getParameter("username"));
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("Filter3 后置代码");
    }

    @Override
    public void destroy() {

    }
}
